package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

import com.example.fw.GroupObject;
import com.example.fw.Groups;

public class GroupCreationTestsEmpty extends TestBase {
	
	@Test
	public void testEmptyGroupCanBeCreated() throws Exception {
		GroupObject emptyData = new GroupObject()
	    	.setName("").setHeader("").setFooter("");
		Groups oldList = app.getGroupHelper().getGroups();
		app.getGroupHelper().createGroup(emptyData);
		Groups newList = app.getGroupHelper().getGroups();
		assertThat(newList, equalTo(oldList.withAdded(emptyData)));
	}
}